package com.hornsun.domain.constant.types;

/**
 * Created by 编译中... on 2018/5/31.
 */
public enum HealthBeansSource {
    FIRSTLOGIN(1,"首次登陆"),
    FIRSTBOUNT(2,"首次绑定"),
    PAY(3,"消费"),
    SIGNIN(4,"签到");
    private Integer type;
    private String name;

    HealthBeansSource(Integer type , String name){this.type=type;this.name=name;}

    public Integer getType() {
        return type;
    }

    public String getName() {
        return name;
    }

    public static HealthBeansSource fromName(String name) {
        for (HealthBeansSource healthSource : values()) {
            if (healthSource.name.equals(name)){
                return healthSource;
            }
        }
        return null;
    }
}
